package org.realogic.cfm;

public class ShutDownHook implements Runnable {

	public ShutDownHook() {
		// add VM shutdown event handler
		try {
			Runtime.getRuntime().addShutdownHook(new Thread(this));
		} catch (Exception e) {
			
		}
		System.out.println(">>>>>>>>>:ShutDownHook");
	}
	
	
	public void run() {
		//close All Resources
		System.out.println("ShutDownHook run......");
		System.out.println("close All Resources");
	}
	
	public void test() {
		System.out.println("ShutDownHook......");
	}
	
	public static void main(String args[]){
		ShutDownHook temp = new ShutDownHook();
		temp.test();
	}

}
